<!DOCTYPE html>
<html>

<head>
    <title>MaskOverlay</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
        body,
        html {
            width: 100%;
            height: 100%;
            margin: 0;
            font-family: "微软雅黑";
        }

        #allmap {
            width: 100%;
            height: 100%;
        }

        p {
            margin-left: 5px;
            font-size: 14px;
        }
    </style>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=3.0&ak=U3q69k0Dv0GCYNiiZeHPf7BS"></script>
    <script src="./data/beiJingGeo.js"></script>
    <script src="../dist/inmap.js"></script>

</head>

<body>
    <div id="allmap"></div>
</body>

</html>
<script>
    inMap.config.devtools = true; //开发模式
    var inmap = new inMap.Map({
        id: 'allmap',

        center: [116.473644, 39.988811],
        zoom: {
            value: 10,
            show: true,
            max: 22
        }
    });

    var overlay = new inMap.MaskOverlay({
        style: {
            backgroundColor: "rgba(31,44,72,1)",
            borderColor: 'rgba(250, 250, 55, 1)',
            shadowColor: 'rgba(250, 250, 55, 1)',
            shadowBlur: 20,
            borderWidth: 16,
        },
        data: [],
        event: {
            onState(state) {
                console.log(state);
            }
        }
    });
    inmap.add(overlay);
    overlay.on('init', function () {
        console.log('init');
    });
    overlay.setData(data, function () {
        console.log('setData');
    });
</script>